package com.igame.Service;

import com.igame.common.PageResult;
import com.igame.common.Result;
import com.igame.dto.InformationPageDto;
import com.igame.entity.Information;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

public interface InformationService {
    Result addInformation(@RequestParam("title") String title,
                          @RequestParam("content") String content,
                          @RequestParam("userId") Integer userId,
                          @RequestPart(value = "image", required = false) MultipartFile image);

    PageResult pageQuery(InformationPageDto dto);


    Result<Information> getInformationById(Integer id);

}

